diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c
index 5a56f66..cc2f338 100644
--- a/drivers/usb/host/ehci-generic.c
+++ b/drivers/usb/host/ehci-generic.c
@@ -26,56 +26,6 @@
 	int reset_count;
 };
 
-static int ehci_setup_phy(struct udevice *dev, int index)
-{
-	struct generic_ehci *priv = dev_get_priv(dev);
-	int ret;
-
-	ret = generic_phy_get_by_index(dev, index, &priv->phy);
-	if (ret) {
-		if (ret != -ENOENT) {
-			dev_err(dev, "failed to get usb phy\n");
-			return ret;
-		}
-	} else {
-		ret = generic_phy_init(&priv->phy);
-		if (ret) {
-			dev_err(dev, "failed to init usb phy\n");
-			return ret;
-		}
-
-		ret = generic_phy_power_on(&priv->phy);
-		if (ret) {
-			dev_err(dev, "failed to power on usb phy\n");
-			return generic_phy_exit(&priv->phy);
-		}
-	}
-
-	return 0;
-}
-
-static int ehci_shutdown_phy(struct udevice *dev)
-{
-	struct generic_ehci *priv = dev_get_priv(dev);
-	int ret = 0;
-
-	if (generic_phy_valid(&priv->phy)) {
-		ret = generic_phy_power_off(&priv->phy);
-		if (ret) {
-			dev_err(dev, "failed to power off usb phy\n");
-			return ret;
-		}
-
-		ret = generic_phy_exit(&priv->phy);
-		if (ret) {
-			dev_err(dev, "failed to power off usb phy\n");
-			return ret;
-		}
-	}
-
-	return 0;
-}
-
 static int ehci_usb_probe(struct udevice *dev)
 {
 	struct generic_ehci *priv = dev_get_priv(dev);
@@ -145,7 +95,7 @@
 		}
 	}
 
-	err = ehci_setup_phy(dev, 0);
+	err = ehci_setup_phy(dev, &priv->phy, 0);
 	if (err)
 		goto reset_err;
 
@@ -160,7 +110,7 @@
 	return 0;
 
 phy_err:
-	ret = ehci_shutdown_phy(dev);
+	ret = ehci_shutdown_phy(dev, &priv->phy);
 	if (ret)
 		dev_err(dev, "failed to shutdown usb phy\n");
 
@@ -185,7 +135,7 @@
 	if (ret)
 		return ret;
 
-	ret = ehci_shutdown_phy(dev);
+	ret = ehci_shutdown_phy(dev, &priv->phy);
 	if (ret)
 		return ret;
 
